home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / m2c / Relations.h < prev    next >
C/C++ Source or Header  |  1992-08-18  |  4KB  |  60 lines

  1. #define DEFINITION_Relations
  2.  
  3. #ifndef DEFINITION_IO
  4. #include "IO.h"
  5. #endif
  6.  
  7. #ifndef DEFINITION_Sets
  8. #include "Sets.h"
  9. #endif
  10.  
  11. typedef struct Relations_1 {
  12.     Sets_tSet A[10000000 + 1];
  13. } Relations_ArrayOfSet;
  14. typedef void (*Relations_ProcOfIntInt) ARGS((INTEGER, INTEGER));
  15. typedef BOOLEAN (*Relations_ProcOfIntIntToBool) ARGS((INTEGER, INTEGER));
  16. typedef struct Relations_2 {
  17.     Relations_ArrayOfSet *ArrayPtr;
  18.     SHORTCARD Size1, Size2;
  19. } Relations_tRelation;
  20. extern void Relations_MakeRelation ARGS((Relations_tRelation *Rel, INTEGER Size1, INTEGER Size2));
  21. extern void Relations_ReleaseRelation ARGS((Relations_tRelation *Rel));
  22. extern void Relations_Include ARGS((Relations_tRelation *Rel, INTEGER e1, INTEGER e2));
  23. extern void Relations_Exclude ARGS((Relations_tRelation *Rel, INTEGER e1, INTEGER e2));
  24. extern BOOLEAN Relations_IsElement ARGS((INTEGER e1, INTEGER e2, Relations_tRelation Rel));
  25. extern BOOLEAN Relations_IsRelated ARGS((INTEGER e1, INTEGER e2, Relations_tRelation Rel));
  26. extern BOOLEAN Relations_IsReflexive1 ARGS((INTEGER e1, Relations_tRelation Rel));
  27. extern BOOLEAN Relations_IsSymmetric1 ARGS((INTEGER e1, INTEGER e2, Relations_tRelation Rel));
  28. extern BOOLEAN Relations_IsTransitive1 ARGS((INTEGER e1, INTEGER e2, INTEGER e3, Relations_tRelation Rel));
  29. extern BOOLEAN Relations_IsReflexive ARGS((Relations_tRelation Rel));
  30. extern BOOLEAN Relations_IsSymmetric ARGS((Relations_tRelation Rel));
  31. extern BOOLEAN Relations_IsTransitive ARGS((Relations_tRelation Rel));
  32. extern BOOLEAN Relations_IsEquivalence ARGS((Relations_tRelation Rel));
  33. extern BOOLEAN Relations_HasReflexive ARGS((Relations_tRelation Rel));
  34. extern BOOLEAN Relations_IsCyclic ARGS((Relations_tRelation Rel));
  35. extern void Relations_GetCyclics ARGS((Relations_tRelation Rel, Sets_tSet *Set));
  36. extern void Relations_Closure ARGS((Relations_tRelation *Rel));
  37. extern void Relations_AssignEmpty ARGS((Relations_tRelation *Rel));
  38. extern void Relations_AssignElmt ARGS((Relations_tRelation *Rel, INTEGER e1, INTEGER e2));
  39. extern void Relations_Assign ARGS((Relations_tRelation *Rel1, Relations_tRelation Rel2));
  40. extern void Relations_Union ARGS((Relations_tRelation *Rel1, Relations_tRelation Rel2));
  41. extern void Relations_Difference ARGS((Relations_tRelation *Rel1, Relations_tRelation Rel2));
  42. extern void Relations_Intersection ARGS((Relations_tRelation *Rel1, Relations_tRelation Rel2));
  43. extern void Relations_SymDiff ARGS((Relations_tRelation *Rel1, Relations_tRelation Rel2));
  44. extern void Relations_Complement ARGS((Relations_tRelation *Rel));
  45. extern BOOLEAN Relations_IsSubset ARGS((Relations_tRelation Rel1, Relations_tRelation Rel2));
  46. extern BOOLEAN Relations_IsStrictSubset ARGS((Relations_tRelation Rel1, Relations_tRelation Rel2));
  47. extern BOOLEAN Relations_IsEqual ARGS((Relations_tRelation *Rel1, Relations_tRelation *Rel2));
  48. extern BOOLEAN Relations_IsNotEqual ARGS((Relations_tRelation Rel1, Relations_tRelation Rel2));
  49. extern BOOLEAN Relations_IsEmpty ARGS((Relations_tRelation Rel));
  50. extern INTEGER Relations_Card ARGS((Relations_tRelation *Rel));
  51. extern void Relations_Select ARGS((Relations_tRelation *Rel, INTEGER *e1, INTEGER *e2));
  52. extern void Relations_Extract ARGS((Relations_tRelation *Rel, INTEGER *e1, INTEGER *e2));
  53. extern BOOLEAN Relations_Forall ARGS((Relations_tRelation Rel, Relations_ProcOfIntIntToBool Proc));
  54. extern BOOLEAN Relations_Exists ARGS((Relations_tRelation Rel, Relations_ProcOfIntIntToBool Proc));
  55. extern BOOLEAN Relations_Exists1 ARGS((Relations_tRelation Rel, Relations_ProcOfIntIntToBool Proc));
  56. extern void Relations_ForallDo ARGS((Relations_tRelation Rel, Relations_ProcOfIntInt Proc));
  57. extern void Relations_ReadRelation ARGS((IO_tFile f, Relations_tRelation *Rel));
  58. extern void Relations_WriteRelation ARGS((IO_tFile f, Relations_tRelation Rel));
  59. extern void BEGIN_Relations();
  60.